﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameOver : MonoBehaviour {

	// Use this for initialization
	void Start () 
    {
        UnityEngine.UI.Button button = gameObject.GetComponentInChildren<UnityEngine.UI.Button>();
        button.onClick.AddListener(Restart);
	}
	
	// Update is called once per frame
	void Update ()
    {
		
	}

    void Restart()
    {
        GlobalCoroutine.Instance.Release();
        UnityEngine.SceneManagement.SceneManager.LoadScene(0);
    }

}
